/*
CParticle.h
Particle element

*/
#pragma once
#include "Entity.h"
#include "../SGD Wrappers/CSGD_Direct3D.h"
#include "../SGD Wrappers/CSGD_TextureManager.h"
#include "../SGD Wrappers/SGD_Math.h"

class CParticle :	public  CEntity
{
public:
	CParticle(void);
	~CParticle(void);

	virtual void Update( float fElapsedTime );
	virtual void Render( void );
	bool IsAlive(void);
	


private:
	//velocity     //need to set these
	float	m_fVelX_VOT;
	float	m_fVelX_End;	
	float	m_fVelX_Current;
	float	m_fVelY_VOT;
	float	m_fVelY_End;	
	float	m_fVelY_Current;
	//float	m_fLife_Max;
	 //how long is it in the living list
	float	m_fLife_Current;


	//scale
	float	m_fScaleX_Current;
	float	m_fScaleY_Current;  
	float	m_fScaleX_End;
	float	m_fScaleY_End; 
	float	m_fScaleX_SOT;
	float	m_fScaleY_SOT; 


	float	m_fRotation_Current; //end rotation and ROT.
	float	m_fRotation_End;
	float	m_fRotation_ROT;
 //  color currents
	float	m_fColorR_Current;
	float	m_fColorR_End;
	float	m_fColorG_Current;
	float	m_fColorG_End;
	float	m_fColorB_Current;
	float	m_fColorB_End;
	float	m_fColorA_Current;
	float	m_fColorA_End;
	
	float	m_fColorR_COT;
	float	m_fColorG_COT;
	float	m_fColorB_COT;
	float	m_fColorA_COT;

	//positions


	int		m_nImageID;

public:
	void SetLife(float X) {m_fLife_Current=X;};
	void SetVelX(float S,float E) {m_fVelX_Current=S;  	m_fVelX_End=E;	m_fVelX_VOT = (m_fVelX_End-m_fVelX_Current)/(m_fLife_Current);		};
	void SetVelY(float S,float E) {m_fVelY_Current=S;  m_fVelY_End=E;m_fVelY_VOT = (m_fVelY_End-m_fVelY_Current)/(m_fLife_Current);			};

	void SetScale(float X,float X2,float Y,float Y2);
	void SetRotation(float X,float Y);
	void SetColorR(float S,float E) { m_fColorR_Current=S;m_fColorR_End=E; };
	void SetColorG(float S,float E) { m_fColorG_Current=S;m_fColorG_End=E; };
	void SetColorB(float S,float E) { m_fColorB_Current=S;m_fColorB_End=E; };
	void SetColorA(float S,float E) { m_fColorA_Current=S;m_fColorA_End=E; };
  

	void SetCOTR(void)	{m_fColorR_COT = (m_fColorR_End-m_fColorR_Current)/m_fLife_Current;};
	void SetCOTG(void)	{m_fColorG_COT = (m_fColorG_End-m_fColorG_Current)/m_fLife_Current;};
	void SetCOTB(void)	{m_fColorB_COT = (m_fColorB_End-m_fColorB_Current)/m_fLife_Current;};
	void SetCOTA(void)	{m_fColorA_COT = (m_fColorA_End-m_fColorA_Current)/m_fLife_Current;};

	void SetOrigin(float X,float Y) {	SetX(X);SetY(Y);};
	void SetImageID(int X){ m_nImageID=X;};

	};

